package com.tsy.server.system.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tsy.server.common.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 组织实体类
 */
@Data
@TableName("organization")
@ApiModel(value = "组织实体", description = "组织数据库实体类")
public class Organization extends BaseEntity {

    /**
     * 组织ID
     */
    @ApiModelProperty(value = "组织ID", example = "ABC123")
    private String orgId;

    /**
     * 组织名称
     */
    @ApiModelProperty(value = "组织名称", example = "测试组织")
    private String orgName;

    /**
     * 组织logo
     */
    @ApiModelProperty(value = "组织logo", example = "https://example.com/logo.png")
    private String orgLogo;

    /**
     * 创建人ID
     */
    @ApiModelProperty(value = "创建人ID", example = "1")
    private Long creatorId;


    //------------------------------------------------------------------

    /**
     * 用户加入组织时间
     */
    @ApiModelProperty(value = "用户加入组织时间", example = "2025-01-01 10:00:00")
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime joinTime;

    /**
     * 用户加入组织名称
     */
    @ApiModelProperty(value = "用户加入组织名称", example = "测试用户")
    @TableField(exist = false)
    private String userOrgName;

    /**
     * 角色名称
     */
    @ApiModelProperty(value = "角色名称", example = "管理员")
    @TableField(exist = false)
    private String roleName;

}